﻿/***********************************************************************************************
 * 
 * ProjectName: WMSSoft.Lib.WinKStart
 * 
 * Description: Contains the configuration for a single action trigger
 * 
 * Created:     07.09.2014
 * 
 * Author:      matthias wagler - matthias@WMSSoft.de
 * 
 * Copyright:   Copyright 2012 by WMSSoft.net
 * 
 * License:     GPLv3
 * 
 * History:     07.09.2014 - matthias wagler matthias@WMSSoft.de   -   Created
 * 
 **********************************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WMSSoft.Lib.Enums;
using WMSSoft.Lib.WinKStart.Abstract;

namespace WMSSoft.Lib.WinKStart.Model.MenuConfig
{
    /// <summary>
    /// Describes the event to raise a trigger 
    /// </summary>
    [Serializable()]
    public class Trigger : CModelBase 
    {
        private eTriggerEvent _Event = eTriggerEvent.Click;
        List<ConditionItem> _Conditions = null;

        public Trigger()
        {
            _Conditions = new List<ConditionItem>();
        }
        /// <summary>
        /// Describe controls event 
        /// </summary>
        public eTriggerEvent Event
        {
            get { return _Event; }
            set 
            { 
                _Event = value;
                OnPropertyChanged();
            }
        }

        /// <summary>
        /// Contains a List of Condition to raise the in "Event" given event
        /// </summary>
        public List<ConditionItem> Conditions
        {
            get { return _Conditions; }
            set 
            { 
                _Conditions = value;
                OnPropertyChanged();
            }
        }

    }
}
